package com.example.timing.job;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author :ld
 * @date :2021/7/9
 */
@Component
@Slf4j
public class ScheduledJob {
    /**
     * @Scheduled(fixedRate = 1000)
     */
    public void hello(){
        log.info("hello spring schedule!");
    }

    @Scheduled(cron = "0/2 * * * * ?")
    public void test(){
        log.info("===测试cron===");
    }
}
